package com.noble.meether.ui.vip.bean;

import com.noble.library.base.bean.BaseData;

import org.json.JSONObject;

/**
 * Vip解析类
 */
public class Vip extends BaseData {
    private int id;
    private int doPay;      // 钻石数量
    private int month;      // VIP时长(月)
    private double amount;   // 金额
    private String describe;// 描述
    private double discount; // 原价
    private int statusVip;  // 状态 1：可用 -1：禁用

    @Override
    public void parseJson(String jsonStr) {
        JSONObject jsonObject = getJsonObject(jsonStr);

        this.setId(jsonObject.optInt("Id"));
        this.setDoPay(jsonObject.optInt("DoPay"));
        this.setMonth(jsonObject.optInt("Month"));
        this.setAmount(jsonObject.optDouble("Amount"));
        this.setDescribe(jsonObject.optString("Describe"));
        this.setDiscount(jsonObject.optDouble("Discount"));
        this.setStatusVip(jsonObject.optInt("StatusVip"));
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getDoPay() {
        return doPay;
    }

    public void setDoPay(int doPay) {
        this.doPay = doPay;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    public int getStatusVip() {
        return statusVip;
    }

    public void setStatusVip(int statusVip) {
        this.statusVip = statusVip;
    }
}
